<?php
/**
 * @author 		Yannici	
 * @copyright 	Yannici
 *
 * @since		10.05.2012
 */
 
 // Login-Box
 if(isset($_GET['do']) && $_GET['do'] == "login")	{
	if($cUser->login($_POST['username'], $_POST['password']))	{
		Functions::locate(Functions::getCurrentUrlNoParameters());
		} else {
		$smarty->assign('login_error', $cUser->getLoginError());
		}
	}

 // Logout
 if(isset($_GET['do']) && $_GET['do'] == "logout")	{
	$cUser->logout();
	Functions::locate(Functions::getCurrentUrlNoParameters());
	}
?>